package com.acsior.hibernate.vo;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.acsior.dac.impl.hibernate.vo.GeneratorKey;
import com.acsior.dac.impl.hibernate.vo.HibernatePersistantIntegerIdVO;

/**
 * OrderBankPayment entity. @author MyEclipse Persistence Tools <b><i>powered by
 * Belev</i></b>
 */
@Entity
@Table(name = "order_bank_payments")
@GeneratorKey(tableName = "order_bank_payments")
public class OrderBankPaymentVO extends HibernatePersistantIntegerIdVO {

	private static final long serialVersionUID = -5681580747333851502L;

	@Column(name = "amount", nullable = false, scale = 4)
	private double amount;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "order_bank_group_id", nullable = false)
	private OrderGroupVO orderBankGroup;

	@Temporal(TemporalType.DATE)
	@Column(name = "payment_date", nullable = false, length = 10)
	private Date paymentDate;

	@Column(name = "payment_number", length = 50)
	private String paymentNumber;

	/** default constructor */
	public OrderBankPaymentVO() {
		super();
	}

	/** @return the amount */
	public double getAmount() {
		return this.amount;
	}

	/** @return the orderBankGroup */
	public OrderGroupVO getOrderBankGroup() {
		return this.orderBankGroup;
	}

	/** @return the paymentDate */
	public Date getPaymentDate() {
		return this.paymentDate;
	}

	/** @return the paymentNumber */
	public String getPaymentNumber() {
		return this.paymentNumber;
	}

	/** @param amount */
	public void setAmount(double amount) {
		this.amount = amount;
	}

	/** @param orderBankGroup */
	public void setOrderBankGroup(OrderGroupVO orderBankGroup) {
		this.orderBankGroup = orderBankGroup;
	}

	/** @param paymentDate */
	public void setPaymentDate(Date paymentDate) {
		this.paymentDate = paymentDate;
	}

	/** @param paymentNumber */
	public void setPaymentNumber(String paymentNumber) {
		this.paymentNumber = paymentNumber;
	}
}